package dynamic.toolkit;



import com.github.yulichang.query.MPJQueryWrapper;
import com.github.yulichang.wrapper.DeleteJoinWrapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.github.yulichang.wrapper.UpdateJoinWrapper;
import dynamic.DynamicEntity;
import dynamic.metadata.EntityClass;
import dynamic.query.DMPJQueryWrapper;
import dynamic.wrapper.DDeleteJoinWrapper;
import dynamic.wrapper.DMPJLambdaWrapper;
import dynamic.wrapper.DUpdateJoinWrapper;

/**
 * @author yulichang
 * @since 1.4.4
 */
@SuppressWarnings("unused")
public class DJoinWrappers {

    /**
     * JoinWrappers.<UserDO>query()
     */
    public static DMPJQueryWrapper query() {
        return new  DMPJQueryWrapper();
    }

    /**
     * JoinWrappers.query(User.class)
     */
    public static  DMPJQueryWrapper query(EntityClass clazz) {
        return new  DMPJQueryWrapper(clazz);
    }

    /**
     * JoinWrappers.query(user)
     */
    public static  DMPJQueryWrapper query(DynamicEntity entity) {
        return new  DMPJQueryWrapper(entity);
    }

    /**
     * JoinWrappers.<UserDO>lambda()
     */


    /**
     * JoinWrappers.<UserDO>lambda("t")
     */
    public static  DMPJLambdaWrapper lambda(String alias) {
        return new DMPJLambdaWrapper(alias);
    }

    /**
     * JoinWrappers.lambda(User.class)
     */
    public static DMPJLambdaWrapper lambda(EntityClass clazz) {
        return new DMPJLambdaWrapper(clazz);
    }

    /**
     * JoinWrappers.lambda("t", User.class)
     */
    public static DMPJLambdaWrapper lambda(String alias, EntityClass clazz) {
        return new DMPJLambdaWrapper(clazz, alias);
    }

    /**
     * JoinWrappers.lambda(user)
     */
    public static DMPJLambdaWrapper lambda(DynamicEntity entity) {
        return new DMPJLambdaWrapper(entity);
    }

    /**
     * JoinWrappers.lambda("t", user)
     */
    public static DMPJLambdaWrapper lambda(String alias, DynamicEntity entity) {
        return new DMPJLambdaWrapper(entity, alias);
    }

    /**
     * JoinWrappers.delete(User.class)
     */
    public static DDeleteJoinWrapper delete(EntityClass clazz) {
        return new DDeleteJoinWrapper(clazz);
    }

    /**
     * JoinWrappers.delete("t", User.class)
     */
    public static  DDeleteJoinWrapper delete(String alias, EntityClass clazz) {
        return new DDeleteJoinWrapper(clazz, alias);
    }

    /**
     * JoinWrappers.update(User.class)
     */
    public static DUpdateJoinWrapper update(EntityClass clazz) {
        return new DUpdateJoinWrapper(clazz);
    }

    /**
     * JoinWrappers.update("t", User.class)
     */
    public static <T> DUpdateJoinWrapper update(String alias, EntityClass clazz) {
        return new DUpdateJoinWrapper(clazz, alias);
    }
}
